<!--
 * @Description: 
 * @Author: @yangwenshan
 * @since: 2021-05-13 16:14:37
 * @LastAuthor: @yangwenshan
 * @lastTime: 2021-05-13 16:26:27
-->
<template>
  <a-modal v-model="visible" :title="title" :closable="false">
    <div class="img-content">
      <a-avatar shape="square" :size="400" :src="src" />
    </div>
    <template slot="footer">
      <a-button type="primary" key="back" @click="handleOk"> 关闭 </a-button>
    </template>
  </a-modal>
</template>
<script>
export default {
  data() {
    return {
      visible: false,
      title: '',
      src: ''
    }
  },
  methods: {
    showModal(src, title) {
      this.src = src
      this.title = title
      this.visible = true
    },
    handleOk() {
      this.visible = false
    }
  }
}
</script>
<style lang="less">
.img-content {
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>
